<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>完善当当购物车页面</title>
    <link type="text/css" rel="stylesheet" href="css/cartStyle.css" />
</head>
<body>

<div class="content">
    <div class="logo">
        <img src="images/dd_logo.jpg"><span>关闭</span>
    </div>
    <div class="cartList">
        <ul>
            <li>¥<input type="text" name="price" value="21.90"></li>
            <li><input type="button" name="minus" value="-"  >
                <input type="text" name="amount" value="1">
                <input type="button" name="plus" value="+"></li>
            <li id="price0">¥21.90</li>
            <li><p>移入收藏</p><p>删除</p></li>
        </ul>
        <ul>
            <li>¥<input type="text" name="price" value="24.00"></li>
            <li><input type="button" name="minus" value="-"><input type="text" name="amount" value="1"><input type="button" name="plus" value="+"></li>
            <li id="price1">¥24.00</li>
            <li><p>移入收藏</p><p>删除</p></li>
        </ul>
        <ol>
            <li id="totalPrice">&nbsp;</li>
            <li><span>结 算</span></li>
        </ol>
    </div>
</div>
<script>
    //*****
  
 
   //
   var  uls=document.getElementsByTagName("ul");
   console.log(uls);
   var a= uls[0].firstElementChild;

   console.log(a);//第一个LI
   var  c=uls[0].firstElementChild.nextElementSibling;//第2个LI
   console.log(c);
 var   c1=  c.firstElementChild.name;//minus
  
 var    c2=c1.nextElementSibling.name;//amount
 var  c3=c2.nextElementSibling.name;//plus
 var c4=c.nextElementSibling.id;//第3个LI的ID
 var  c5=c4.nextElementSibling;//第4个LI的ID


</script>
</body>
</html>